<template>
	<view class="listHeader">
		<lotus-radio @radioChange="onRadioChange" :selected="selected" />
		<image :src="icon" class="listHeaderIcon"/>
		<text class="listTitleText">{{title}}</text>
	</view>
</template>

<script>
	import lotusRadio from '@/components/lotus-radio/lotus-radio.vue';
	
	export default {
		props: {
			selected: {
				type: Boolean,
				default: false
			},
			title: {
				type: String,
				default: '列表标题'
			},
			icon: {
				type: String,
				default: '/static/icon/icon-eshop--express.png'
			}
		},
		components: {
			lotusRadio
		},
		methods: {
			onRadioChange() {
				this.$emit('radioChange')
			},
		}
	}
</script>

<style scope>
	.listHeader {
		/* #ifdef H5 || MP-WEIXIN */
		display: flex;
		/* #endif */
		flex-direction: row;
		background-color: #FAFAFA;
		padding-left: 20rpx;
		padding-right: 20rpx;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
		align-items: center;
	}
	.listHeaderIcon {
		width: 30rpx;
		height: 30rpx;
		margin-left: 15rpx;
	}
	.listTitleText {
		font-size: 26rpx;
		margin-left: 15rpx;
	}
</style>
